<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB">
<title>Gosl &ndash; package gm/msh</title>
<link type="text/css" rel="stylesheet" href="static/style.css">
<script type="text/javascript" src="static/godocs.js"></script>
<style type="text/css"></style>
</head>
<body>
<div id="page" class=\wide">
<div class="container">
<h1>Gosl &ndash; <b>gm/msh</b> &ndash; Mesh generation and Delaunay triangulation</h1>
use 'godoc cmd/github.com/cpmech/gosl/gm/msh' for documentation on the github.com/cpmech/gosl/gm/msh command 

<!--
	Copyright 2009 The Go Authors. All rights reserved.
	Use of this source code is governed by a BSD-style
	license that can be found in the LICENSE file.
-->
<!--
	Note: Static (i.e., not template-generated) href and id
	attributes start with "pkg-" to make it impossible for
	them to conflict with generated attributes (some of which
	correspond to Go identifiers).
-->

	<script type='text/javascript'>
	document.ANALYSIS_DATA = ;
	document.CALLGRAPH = ;
	</script>

	
		
		<div id="short-nav">
			<dl>
			<dd><code>import "github.com/cpmech/gosl/gm/msh"</code></dd>
			</dl>
			<dl>
			<dd><a href="#pkg-overview" class="overviewLink">Overview</a></dd>
			<dd><a href="#pkg-index" class="indexLink">Index</a></dd>
			
			
				<dd><a href="#pkg-subdirectories">Subdirectories</a></dd>
			
			</dl>
		</div>
		<!-- The package's Name is printed as title by the top-level template -->
		<div id="pkg-overview" class="toggleVisible">
			<div class="collapsed">
				<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
			</div>
			<div class="expanded">
				<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
				<p>
package msh implements functions to generate meshes
</p>

			</div>
		</div>
		

		<div id="pkg-index" class="toggleVisible">
		<div class="collapsed">
			<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
		</div>
		<div class="expanded">
			<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>

		<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
			<div id="manual-nav">
			<dl>
			
			
				<dd><a href="#pkg-variables">Variables</a></dd>
			
			
				
				<dd><a href="#Hex20">func Hex20(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Hex8">func Hex8(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Lin2">func Lin2(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Lin3">func Lin3(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Lin4">func Lin4(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Lin5">func Lin5(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Qua12">func Qua12(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Qua16">func Qua16(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Qua4">func Qua4(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Qua8">func Qua8(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Qua9">func Qua9(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tet10">func Tet10(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tet4">func Tet4(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tri10">func Tri10(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tri15">func Tri15(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tri3">func Tri3(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
				
				<dd><a href="#Tri6">func Tri6(S []float64, dSdR [][]float64, R []float64, derivs bool)</a></dd>
			
			
				
				<dd><a href="#BryPair">type BryPair</a></dd>
				
				
			
				
				<dd><a href="#BryPairSet">type BryPairSet</a></dd>
				
				
			
				
				<dd><a href="#Cell">type Cell</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Cell.String">func (o *Cell) String() string</a></dd>
				
			
				
				<dd><a href="#CellSet">type CellSet</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#CellSet.Len">func (o CellSet) Len() int</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CellSet.Less">func (o CellSet) Less(i, j int) bool</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#CellSet.Swap">func (o CellSet) Swap(i, j int)</a></dd>
				
			
				
				<dd><a href="#Edge">type Edge</a></dd>
				
				
			
				
				<dd><a href="#EdgeKey">type EdgeKey</a></dd>
				
				
			
				
				<dd><a href="#EdgeSet">type EdgeSet</a></dd>
				
				
			
				
				<dd><a href="#EdgesMap">type EdgesMap</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#EdgesMap.Find">func (o EdgesMap) Find(key EdgeKey) *Edge</a></dd>
				
			
				
				<dd><a href="#Face">type Face</a></dd>
				
				
			
				
				<dd><a href="#FaceKey">type FaceKey</a></dd>
				
				
			
				
				<dd><a href="#FaceSet">type FaceSet</a></dd>
				
				
			
				
				<dd><a href="#FacesMap">type FacesMap</a></dd>
				
				
			
				
				<dd><a href="#Mesh">type Mesh</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Read">func Read(fn string) (o *Mesh, err error)</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Mesh.CalcLimits">func (o *Mesh) CalcLimits() (Ndim int, Min []float64, Max []float64, err error)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mesh.Check">func (o *Mesh) Check() (err error)</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#Mesh.GetTagMaps">func (o *Mesh) GetTagMaps() (m *TagMaps, err error)</a></dd>
				
			
				
				<dd><a href="#ShapeFunction">type ShapeFunction</a></dd>
				
				
			
				
				<dd><a href="#TagMaps">type TagMaps</a></dd>
				
				
			
				
				<dd><a href="#VertSet">type VertSet</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#VertSet.Len">func (o VertSet) Len() int</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#VertSet.Less">func (o VertSet) Less(i, j int) bool</a></dd>
				
					
					<dd>&nbsp; &nbsp; <a href="#VertSet.Swap">func (o VertSet) Swap(i, j int)</a></dd>
				
			
				
				<dd><a href="#Vertex">type Vertex</a></dd>
				
				
					
					<dd>&nbsp; &nbsp; <a href="#Vertex.String">func (o *Vertex) String() string</a></dd>
				
			
			
			</dl>
			</div><!-- #manual-nav -->

		

		
			<h4>Package files</h4>
			<p>
			<span style="font-size:90%">
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/mesh.go">mesh.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/output.go">output.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/s_hexs.go">s_hexs.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/s_lins.go">s_lins.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/s_quads.go">s_quads.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/s_tets.go">s_tets.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/s_tris.go">s_tris.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/shapes.go">shapes.go</a>
			
				<a href="/src/github.com/cpmech/gosl/gm/msh/sortandfind.go">sortandfind.go</a>
			
			</span>
			</p>
		
		</div><!-- .expanded -->
		</div><!-- #pkg-index -->

		<div id="pkg-callgraph" class="toggle" style="display: none">
		<div class="collapsed">
			<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
		</div> <!-- .expanded -->
		<div class="expanded">
			<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
			<p>
			  In the call graph viewer below, each node
			  is a function belonging to this package
			  and its children are the functions it
			  calls&mdash;perhaps dynamically.
			</p>
			<p>
			  The root nodes are the entry points of the
			  package: functions that may be called from
			  outside the package.
			  There may be non-exported or anonymous
			  functions among them if they are called
			  dynamically from another package.
			</p>
			<p>
			  Click a node to visit that function's source code.
			  From there you can visit its callers by
			  clicking its declaring <code>func</code>
			  token.
			</p>
			<p>
			  Functions may be omitted if they were
			  determined to be unreachable in the
			  particular programs or tests that were
			  analyzed.
			</p>
			<!-- Zero means show all package entry points. -->
			<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
		</div>
		</div> <!-- #pkg-callgraph -->

		
		
			<h2 id="pkg-variables">Variables</h2>
			
				<pre>var (
    <span id="NumVerts">NumVerts</span>       map[<a href="/pkg/builtin/#string">string</a>]<a href="/pkg/builtin/#int">int</a>         <span class="comment">// number of vertices on shape</span>
    <span id="GeomNdim">GeomNdim</span>       map[<a href="/pkg/builtin/#string">string</a>]<a href="/pkg/builtin/#int">int</a>         <span class="comment">// geometry number of space dimensions</span>
    <span id="EdgeLocalVerts">EdgeLocalVerts</span> map[<a href="/pkg/builtin/#string">string</a>][][]<a href="/pkg/builtin/#int">int</a>     <span class="comment">// local indices of vertices on edges of shape</span>
    <span id="FaceLocalVerts">FaceLocalVerts</span> map[<a href="/pkg/builtin/#string">string</a>][][]<a href="/pkg/builtin/#int">int</a>     <span class="comment">// local indices of vertices on faces of shape</span>
    <span id="NatCoords">NatCoords</span>      map[<a href="/pkg/builtin/#string">string</a>][][]<a href="/pkg/builtin/#float64">float64</a> <span class="comment">// natural coordinates of vertices on shape</span>
)</pre>
				
			
				<pre>var <span id="Functions">Functions</span> = <a href="/pkg/builtin/#make">make</a>(map[<a href="/pkg/builtin/#string">string</a>]<a href="#ShapeFunction">ShapeFunction</a>) <span class="comment">// shape functions and derivatives</span>
</pre>
				
			
		
		
			
			
			<h2 id="Hex20">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_hexs.go?s=2657:2724#L70">Hex20</a></h2>
			<pre>func Hex20(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Hex20 calculates the shape functions (S) and derivatives of shape functions (dSdR) of hex20
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Hex8">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_hexs.go?s=436:502#L4">Hex8</a></h2>
			<pre>func Hex8(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Hex8 calculates the shape functions (S) and derivatives of shape functions (dSdR) of hex8
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Lin2">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_lins.go?s=486:552#L6">Lin2</a></h2>
			<pre>func Lin2(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Lin2 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin2
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Lin3">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_lins.go?s=922:988#L25">Lin3</a></h2>
			<pre>func Lin3(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Lin3 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin3
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Lin4">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_lins.go?s=1406:1472#L46">Lin4</a></h2>
			<pre>func Lin4(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Lin4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin4
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Lin5">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_lins.go?s=2219:2285#L70">Lin5</a></h2>
			<pre>func Lin5(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Lin5 calculates the shape functions (S) and derivatives of shape functions (dSdR) of lin5
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Qua12">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_quads.go?s=4439:4506#L137">Qua12</a></h2>
			<pre>func Qua12(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Qua12 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua12
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Qua16">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_quads.go?s=7218:7285#L205">Qua16</a></h2>
			<pre>func Qua16(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Qua16 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua16
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Qua4">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_quads.go?s=516:582#L7">Qua4</a></h2>
			<pre>func Qua4(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Qua4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua4
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Qua8">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_quads.go?s=1344:1410#L39">Qua8</a></h2>
			<pre>func Qua8(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Qua8 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua8
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Qua9">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_quads.go?s=2757:2823#L84">Qua9</a></h2>
			<pre>func Qua9(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Qua9 calculates the shape functions (S) and derivatives of shape functions (dSdR) of qua9
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tet10">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tets.go?s=1770:1837#L62">Tet10</a></h2>
			<pre>func Tet10(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tet10 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tet10
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tet4">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tets.go?s=436:502#L4">Tet4</a></h2>
			<pre>func Tet4(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tet4 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tet4
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tri10">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tris.go?s=2320:2387#L85">Tri10</a></h2>
			<pre>func Tri10(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tri10 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri10
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tri15">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tris.go?s=3910:3977#L159">Tri15</a></h2>
			<pre>func Tri15(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tri15 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri15
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tri3">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tris.go?s=490:556#L6">Tri3</a></h2>
			<pre>func Tri3(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tri3 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri3
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
			
			
			<h2 id="Tri6">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/s_tris.go?s=1237:1303#L41">Tri6</a></h2>
			<pre>func Tri6(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
Tri6 calculates the shape functions (S) and derivatives of shape functions (dSdR) of tri6
elements at {r,s,t} natural coordinates. The derivatives are calculated only if derivs==true.
</p>

			
			

		
		
			
			
			<h2 id="BryPair">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2640:2749#L99">BryPair</a></h2>
			<pre>type BryPair struct {
    C     *<a href="#Cell">Cell</a> <span class="comment">// cell</span>
    BryId <a href="/pkg/builtin/#int">int</a>   <span class="comment">// edge local id (edgeId) OR face local id (faceId)</span>
}</pre>
			<p>
BryPair defines a structure to identify bryIds =&gt; cells pairs
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="BryPairSet">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2802:2828#L105">BryPairSet</a></h2>
			<pre>type BryPairSet []*<a href="#BryPair">BryPair</a></pre>
			<p>
BryPairSet defines a set of BryPair identifiers
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="Cell">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=1457:2095#L53">Cell</a></h2>
			<pre>type Cell struct {

    <span class="comment">// input</span>
    Id       <a href="/pkg/builtin/#int">int</a>    `json:&#34;i&#34;`  <span class="comment">// identifier</span>
    Tag      <a href="/pkg/builtin/#int">int</a>    `json:&#34;t&#34;`  <span class="comment">// tag</span>
    Part     <a href="/pkg/builtin/#int">int</a>    `json:&#34;p&#34;`  <span class="comment">// partition id</span>
    Disabled <a href="/pkg/builtin/#bool">bool</a>   `json:&#34;d&#34;`  <span class="comment">// cell is disabled</span>
    Type     <a href="/pkg/builtin/#string">string</a> `json:&#34;y&#34;`  <span class="comment">// geometry type</span>
    V        []<a href="/pkg/builtin/#int">int</a>  `json:&#34;v&#34;`  <span class="comment">// vertices</span>
    EdgeTags []<a href="/pkg/builtin/#int">int</a>  `json:&#34;et&#34;` <span class="comment">// edge tags (2D or 3D)</span>
    FaceTags []<a href="/pkg/builtin/#int">int</a>  `json:&#34;ft&#34;` <span class="comment">// face tags (3D only)</span>

    <span class="comment">// auxiliary</span>
    Entity interface{} <span class="comment">// any entity attached to this vertex</span>

    <span class="comment">// derived</span>
    Edges      <a href="#EdgeSet">EdgeSet</a> `json:&#34;-&#34;` <span class="comment">// edges on this cell</span>
    Faces      <a href="#FaceSet">FaceSet</a> `json:&#34;-&#34;` <span class="comment">// faces on this cell</span>
    Neighbours <a href="#CellSet">CellSet</a> `json:&#34;-&#34;` <span class="comment">// neighbour cells</span>
}</pre>
			<p>
Cell holds cell data (in .msh file)
</p>


			

			

			
			
			

			

			
				
				<h3 id="Cell.String">func (*Cell) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/output.go?s=506:536#L13">String</a></h3>
				<pre>func (o *<a href="#Cell">Cell</a>) String() <a href="/pkg/builtin/#string">string</a></pre>
				<p>
String returns a JSON representation of *Cell
</p>

				
				
				
			
		
			
			
			<h2 id="CellSet">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=830:850#L28">CellSet</a></h2>
			<pre>type CellSet []*<a href="#Cell">Cell</a></pre>
			<p>
CellSet defines a set of cells
</p>


			

			

			
			
			

			

			
				
				<h3 id="CellSet.Len">func (CellSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=530:556#L9">Len</a></h3>
				<pre>func (o <a href="#CellSet">CellSet</a>) Len() <a href="/pkg/builtin/#int">int</a></pre>
				<p>
Functions to sort CellSet
</p>

				
				
				
			
				
				<h3 id="CellSet.Less">func (CellSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=650:686#L11">Less</a></h3>
				<pre>func (o <a href="#CellSet">CellSet</a>) Less(i, j <a href="/pkg/builtin/#int">int</a>) <a href="/pkg/builtin/#bool">bool</a></pre>
				
				
				
				
			
				
				<h3 id="CellSet.Swap">func (CellSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=585:616#L10">Swap</a></h3>
				<pre>func (o <a href="#CellSet">CellSet</a>) Swap(i, j <a href="/pkg/builtin/#int">int</a>)</pre>
				
				
				
				
			
		
			
			
			<h2 id="Edge">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2360:2454#L87">Edge</a></h2>
			<pre>type Edge struct {
    V <a href="#VertSet">VertSet</a> <span class="comment">// vertices on edge</span>
    C <a href="#CellSet">CellSet</a> <span class="comment">// cells connected to this edge</span>
}</pre>
			<p>
Edge defines an edge
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="EdgeKey">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=373:471#L7">EdgeKey</a></h2>
			<pre>type EdgeKey struct {
    NumVerts <a href="/pkg/builtin/#int">int</a> <span class="comment">// number of vertices, from A to C</span>
    A, B, C  <a href="/pkg/builtin/#int">int</a> <span class="comment">// vertices</span>
}</pre>
			<p>
EdgeKey implements a key to identify edges
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="EdgeSet">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=718:738#L22">EdgeSet</a></h2>
			<pre>type EdgeSet []*<a href="#Edge">Edge</a></pre>
			<p>
EdgeSet defines a set of edges
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="EdgesMap">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=889:920#L31">EdgesMap</a></h2>
			<pre>type EdgesMap map[<a href="#EdgeKey">EdgeKey</a>]*<a href="#Edge">Edge</a></pre>
			<p>
EdgeSetMap defines a map of Edges
</p>


			

			

			
			
			

			

			
				
				<h3 id="EdgesMap.Find">func (EdgesMap) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=226:267#L1">Find</a></h3>
				<pre>func (o <a href="#EdgesMap">EdgesMap</a>) Find(key <a href="#EdgeKey">EdgeKey</a>) *<a href="#Edge">Edge</a></pre>
				<p>
Find finds an edge
</p>
<pre>Returns nil if not found
</pre>

				
				
				
			
		
			
			
			<h2 id="Face">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2479:2573#L93">Face</a></h2>
			<pre>type Face struct {
    V <a href="#VertSet">VertSet</a> <span class="comment">// vertices on face</span>
    C <a href="#CellSet">CellSet</a> <span class="comment">// cells connected to this face</span>
}</pre>
			<p>
Face defines a face
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="FaceKey">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=519:621#L13">FaceKey</a></h2>
			<pre>type FaceKey struct {
    NumVerts   <a href="/pkg/builtin/#int">int</a> <span class="comment">// number of vertices, from A to D</span>
    A, B, C, D <a href="/pkg/builtin/#int">int</a> <span class="comment">// vertices</span>
}</pre>
			<p>
FaceKey implements a key to identify faces
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="FaceSet">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=774:794#L25">FaceSet</a></h2>
			<pre>type FaceSet []*<a href="#Face">Face</a></pre>
			<p>
FaceSet defines a set of faces
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="FacesMap">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=956:987#L34">FacesMap</a></h2>
			<pre>type FacesMap map[<a href="#FaceKey">FaceKey</a>]*<a href="#Face">Face</a></pre>
			<p>
FaceSet defines a map of Faces
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="Mesh">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2123:2334#L75">Mesh</a></h2>
			<pre>type Mesh struct {

    <span class="comment">// input</span>
    Verts <a href="#VertSet">VertSet</a> `json:&#34;verts&#34;` <span class="comment">// vertices</span>
    Cells <a href="#CellSet">CellSet</a> `json:&#34;cells&#34;` <span class="comment">// cells</span>

    <span class="comment">// derived</span>
    EdgesMap <a href="#EdgesMap">EdgesMap</a> `json:&#34;-&#34;` <span class="comment">// all edges</span>
    FacesMap <a href="#FacesMap">FacesMap</a> `json:&#34;-&#34;` <span class="comment">// all faces</span>
}</pre>
			<p>
Mesh defines mesh data
</p>


			

			

			
			
			

			
				
				<h3 id="Read">func <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=3528:3569#L120">Read</a></h3>
				<pre>func Read(fn <a href="/pkg/builtin/#string">string</a>) (o *<a href="#Mesh">Mesh</a>, err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Read reads mesh
</p>

				
				
			

			
				
				<h3 id="Mesh.CalcLimits">func (*Mesh) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=5255:5334#L193">CalcLimits</a></h3>
				<pre>func (o *<a href="#Mesh">Mesh</a>) CalcLimits() (Ndim <a href="/pkg/builtin/#int">int</a>, Min []<a href="/pkg/builtin/#float64">float64</a>, Max []<a href="/pkg/builtin/#float64">float64</a>, err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
CalcLimits calculates limits and space dimension
</p>

				
				
				
			
				
				<h3 id="Mesh.Check">func (*Mesh) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=3834:3868#L143">Check</a></h3>
				<pre>func (o *<a href="#Mesh">Mesh</a>) Check() (err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
Check checks whether input data is correct or not
</p>

				
				
				
			
				
				<h3 id="Mesh.GetTagMaps">func (*Mesh) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=5845:5896#L223">GetTagMaps</a></h3>
				<pre>func (o *<a href="#Mesh">Mesh</a>) GetTagMaps() (m *<a href="#TagMaps">TagMaps</a>, err <a href="/pkg/builtin/#error">error</a>)</pre>
				<p>
GetTagMaps finds tagged entities
</p>

				
				
				
			
		
			
			
			<h2 id="ShapeFunction">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/shapes.go?s=236:316#L1">ShapeFunction</a></h2>
			<pre>type ShapeFunction func(S []<a href="/pkg/builtin/#float64">float64</a>, dSdR [][]<a href="/pkg/builtin/#float64">float64</a>, R []<a href="/pkg/builtin/#float64">float64</a>, derivs <a href="/pkg/builtin/#bool">bool</a>)</pre>
			<p>
ShapeFunction computes the shape function and derivatives
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="TagMaps">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=2890:3507#L108">TagMaps</a></h2>
			<pre>type TagMaps struct {
    VertTag2verts  map[<a href="/pkg/builtin/#int">int</a>]<a href="#VertSet">VertSet</a>    <span class="comment">// vertex tag =&gt; set of vertices</span>
    CellTag2cells  map[<a href="/pkg/builtin/#int">int</a>]<a href="#CellSet">CellSet</a>    <span class="comment">// cell tag =&gt; set of cells</span>
    CellType2cells map[<a href="/pkg/builtin/#string">string</a>]<a href="#CellSet">CellSet</a> <span class="comment">// cell type =&gt; set of cells</span>
    CellPart2cells map[<a href="/pkg/builtin/#int">int</a>]<a href="#CellSet">CellSet</a>    <span class="comment">// partition number =&gt; set of cells</span>
    EdgeTag2cells  map[<a href="/pkg/builtin/#int">int</a>]<a href="#BryPairSet">BryPairSet</a> <span class="comment">// edge tag =&gt; set of cells {cell,boundaryId}</span>
    EdgeTag2verts  map[<a href="/pkg/builtin/#int">int</a>]<a href="#VertSet">VertSet</a>    <span class="comment">// edge tag =&gt; vertices on tagged edge [unique]</span>
    FaceTag2cells  map[<a href="/pkg/builtin/#int">int</a>]<a href="#BryPairSet">BryPairSet</a> <span class="comment">// face tag =&gt; set of cells {cell,boundaryId}</span>
    FaceTag2verts  map[<a href="/pkg/builtin/#int">int</a>]<a href="#VertSet">VertSet</a>    <span class="comment">// face tag =&gt; vertices on tagged edge [unique]</span>
}</pre>
			<p>
TagMaps holds data for finding information based on tags
</p>


			

			

			
			
			

			

			
		
			
			
			<h2 id="VertSet">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=660:682#L19">VertSet</a></h2>
			<pre>type VertSet []*<a href="#Vertex">Vertex</a></pre>
			<p>
VertSet defines a set of vertices
</p>


			

			

			
			
			

			

			
				
				<h3 id="VertSet.Len">func (VertSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=314:340#L4">Len</a></h3>
				<pre>func (o <a href="#VertSet">VertSet</a>) Len() <a href="/pkg/builtin/#int">int</a></pre>
				<p>
Functions to sort VertSet
</p>

				
				
				
			
				
				<h3 id="VertSet.Less">func (VertSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=434:470#L6">Less</a></h3>
				<pre>func (o <a href="#VertSet">VertSet</a>) Less(i, j <a href="/pkg/builtin/#int">int</a>) <a href="/pkg/builtin/#bool">bool</a></pre>
				
				
				
				
			
				
				<h3 id="VertSet.Swap">func (VertSet) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/sortandfind.go?s=369:400#L5">Swap</a></h3>
				<pre>func (o <a href="#VertSet">VertSet</a>) Swap(i, j <a href="/pkg/builtin/#int">int</a>)</pre>
				
				
				
				
			
		
			
			
			<h2 id="Vertex">type <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/mesh.go?s=1038:1416#L37">Vertex</a></h2>
			<pre>type Vertex struct {

    <span class="comment">// input</span>
    Id  <a href="/pkg/builtin/#int">int</a>       `json:&#34;i&#34;` <span class="comment">// identifier</span>
    Tag <a href="/pkg/builtin/#int">int</a>       `json:&#34;t&#34;` <span class="comment">// tag</span>
    X   []<a href="/pkg/builtin/#float64">float64</a> `json:&#34;x&#34;` <span class="comment">// coordinates (size==2 or 3)</span>

    <span class="comment">// auxiliary</span>
    Entity interface{} `json:&#34;-&#34;` <span class="comment">// any entity attached to this vertex</span>

    <span class="comment">// derived</span>
    SharedByCells <a href="#CellSet">CellSet</a> `json:&#34;-&#34;` <span class="comment">// cells sharing this vertex</span>
    Neighbours    <a href="#VertSet">VertSet</a> `json:&#34;-&#34;` <span class="comment">// neighbour vertices</span>
}</pre>
			<p>
Vertex holds vertex data (e.g. from msh file)
</p>


			

			

			
			
			

			

			
				
				<h3 id="Vertex.String">func (*Vertex) <a href="https://github.com/cpmech/gosl/blob/master/gm/msh/output.go?s=260:292#L1">String</a></h3>
				<pre>func (o *<a href="#Vertex">Vertex</a>) String() <a href="/pkg/builtin/#string">string</a></pre>
				<p>
String returns a JSON representation of *Vert
</p>

				
				
				
			
		
	

	





	
	
		<h2 id="pkg-subdirectories">Subdirectories</h2>
	
	


	<div class="pkg-dir">
		<table>
			<tr>
				<th class="pkg-name">Name</th>
				<th class="pkg-synopsis">Synopsis</th>
			</tr>

			
			<tr>
				<td colspan="2"><a href="..">..</a></td>
			</tr>
			

			
				
					<tr>
						<td class="pkg-name" style="padding-left: 0px;">
							<a href="data/">data</a>
						</td>
						<td class="pkg-synopsis">
							
						</td>
					</tr>
				
			
		</table>
	</div>


	


<div id="footer">
<br /><br />
<hr>
<pre class="copyright">
Copyright (c) 2016, The Gosl Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of Gosl nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

</pre><!-- copyright -->
</div><!-- footer -->

</div><!-- container -->
</div><!-- page -->
</body>
</html>
